/** 
Copyright (c) 2010, Sheikh Abdul Wahid Ahmed
Details @ http://extremecodeworld.codeplex.com/license
**/

using System;
using System.Collections.Generic;
using System.Text;
using System.Web;

namespace EXtremecode.PresentationLayer
{
    public class ResourceProvider
    {
        public static string GetResourceString(string classKey, string resourceKey)
        {
            string str = string.Empty;
            try
            {
                object obj = HttpContext.GetGlobalResourceObject(classKey, resourceKey);
                if (obj != null)
                {
                    str = obj.ToString();
                }
                
            }
            catch { }
            return str;
        }

        public static string GetGeneralResourceString(string resourceKey)
        {
            return GetResourceString("GeneralResource", resourceKey);
        }

        public static string GetExpression(string resourceKey)
        {
            return GetResourceString("ExpressionResource", resourceKey);
        }
    }
}
